<% layout('/layouts/default.html', {title: '数据管理', libs:
['validate','fileupload','ueditor','dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text(ztRecovery.isNewRecord ?
				'新增回购物品' : '编辑回购物品')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool"
					data-widget="collapse">
					<i class="fa fa-minus"></i>
				</button>
			</div>
		</div>
		<#form:form id="inputForm" model="${ztRecovery}"
		action="${ctx}/ztRecovery/save" method="post" class="form-horizontal">
		<div class="box-body">
			<div class="form-unit">${text('回购物品信息')}</div>
			<#form:hidden path="id"/>
			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('客服估价')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="gjprice"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');"
							maxlength="200" class="form-control required" /></div>
					</div>
				</div>

				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('订单状态')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:radio path="codestatus"
							dictType="zt_recovery_type" class="form-control"
							/></div>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('物品名')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="title"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('订单号')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="code"
							maxlength="100" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>

			</div>

			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('心理价格')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="price"
							onkeyup="this.value=this.value.replace(/[^0-9-.-]+/,'');"
							maxlength="200" class="form-control required"
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('物流名')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="logisticsName"
							maxlength="100" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>

			</div>


			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('商品型号')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="model"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('物流单号')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="logistics"
							maxlength="100" class="form-control required "
							disabled="disabled"/>
						<input id="retrieval" onclick="openWin('${ctx}/ztWl/list?logistics=${ztRecovery.logistics}&logisticsCode=${ztRecovery.logisticsCode}', 900, 600)"
				class="btn btn-primary" type="button" style="background:#00B2EE" value="查看物流信息" />	
						</div>
					</div>
				</div>

			</div>


			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('商品类别')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:select path="ztGoodsType.id"
							items="${typeList}" itemLabel="name" itemValue="id"
							blankOption="true" class="form-control required"
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required hide">*</span> ${text('物品图片')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8">
							<img src="${ztRecovery.imgs}" />
						</div>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('联络人')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="contacts"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('手机号码')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="phone"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>

			</div>
			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('实名姓名')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="name"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('实名身份证号码')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="ident"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>

			</div>
			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('是否能正常使用')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:radio path="isuse"
							dictType="zt_isuse_type" class="form-control"
							disabled="disabled"/></div>
					</div>
				</div>
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('零件是否齐全')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:radio path="iscomplete"
							dictType="zt_iscomplete_type" class="form-control"
							disabled="disabled"/></div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('外观磨损程度')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:radio path="iswear"
							dictType="zt_iswear_type" class="form-control"
							disabled="disabled"/></div>
					</div>
				</div>

				<div class="col-xs-6">
					<div class="form-group">
						<label class="control-label col-sm-4" title=""> <span
							class="required">*</span> ${text('小程序用户名')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-8"><#form:input path="ztAdmin.name"
							maxlength="240" class="form-control required "
							disabled="disabled"/></div>
					</div>
				</div>
			</div>

			<div class="row">
				<div class="col-xs-12">
					<div class="form-group">
						<label class="control-label col-sm-2" title=""> <span
							class="required hide">*</span> ${text('商品简述')}：<i
							class="fa icon-question hide"></i></label>
						<div class="col-sm-10"><#form:textarea path="remarks"
							rows="4" maxlength="300" class="form-control"
							disabled="disabled"/></div>
					</div>
				</div>


			</div>


		</div>
		<div class="box-footer">
			<div class="row">
				<div class="col-sm-offset-2 col-sm-10">
					<% if (hasPermi('ztGoods:ztGoodsData:edit')){ %>
					<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit">
						<i class="fa fa-check"></i> ${text('保 存')}
					</button>
					&nbsp; <% } %>
					<button type="button" class="btn btn-sm btn-default" id="btnCancel"
						onclick="js.closeCurrentTabPage()">
						<i class="fa fa-reply-all"></i> ${text('关 闭')}
					</button>
				</div>
			</div>
		</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
function openWin(u, w, h) { 
    var l = (screen.width - w) / 2; 
    var t = (screen.height - h) / 2; 
    var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l; 
    s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no'; 
    open(u, 'oWin', s); 
}
	$("#inputForm").validate({
		submitHandler : function(form) {
			js.ajaxSubmitForm($(form), function(data) {
				js.showMessage(data.message);
				if (data.result == Global.TRUE) {
					js.closeCurrentTabPage(function(contentWindow) {
						contentWindow.page();
					});
				}
			}, "json");
		}
	});
</script>